home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / crack200 / frmselec.frm (.txt) < prev    next >
Visual Basic Form  |  1999-09-05  |  3KB  |  92 lines

  1. VERSION 5.00
  2. Begin VB.Form frmSelect 
  3.    Caption         =   "Select Window To Crack"
  4.    ClientHeight    =   3705
  5.    ClientLeft      =   5130
  6.    ClientTop       =   2415
  7.    ClientWidth     =   5910
  8.    Icon            =   "frmSelect.frx":0000
  9.    LinkTopic       =   "Form1"
  10.    ScaleHeight     =   3705
  11.    ScaleWidth      =   5910
  12.    Begin VB.CommandButton cmdClose 
  13.       Cancel          =   -1  'True
  14.       Caption         =   "&Close"
  15.       Height          =   375
  16.       Left            =   2520
  17.       TabIndex        =   3
  18.       Top             =   3240
  19.       Width           =   1095
  20.    End
  21.    Begin VB.CommandButton cmdSwitch 
  22.       Caption         =   "Crack"
  23.       Height          =   375
  24.       Left            =   1320
  25.       TabIndex        =   2
  26.       ToolTipText     =   "Switch to the Selected Task"
  27.       Top             =   3240
  28.       Width           =   1095
  29.    End
  30.    Begin VB.CommandButton cmdRefresh 
  31.       Caption         =   "&Refresh"
  32.       Default         =   -1  'True
  33.       Height          =   375
  34.       Left            =   120
  35.       TabIndex        =   1
  36.       ToolTipText     =   "Refresh the Task List"
  37.       Top             =   3240
  38.       Width           =   1095
  39.    End
  40.    Begin VB.ListBox lstTasks 
  41.       Height          =   3015
  42.       IntegralHeight  =   0   'False
  43.       Left            =   120
  44.       Sorted          =   -1  'True
  45.       TabIndex        =   0
  46.       Top             =   120
  47.       Width           =   5655
  48.    End
  49. Attribute VB_Name = "frmSelect"
  50. Attribute VB_GlobalNameSpace = False
  51. Attribute VB_Creatable = False
  52. Attribute VB_PredeclaredId = True
  53. Attribute VB_Exposed = False
  54. Option Explicit
  55. Private Sub cmdClose_Click()
  56. frmSelect.Visible = False
  57. End Sub
  58. Private Sub cmdSwitch_Click()
  59. With lstTasks
  60.     If .ListCount = 0 Then Exit Sub
  61. End With
  62. frmMain.txtName.Text = lstTasks
  63. frmSelect.Visible = False
  64. SetNewCaption lstTasks, lstTasks + " - Microsoft Internet Explorer"
  65. End Sub
  66. Private Sub cmdRefresh_Click()
  67. Call pGetTasks
  68. End Sub
  69. Private Sub Form_Load()
  70. If App.PrevInstance Then Unload Me
  71. Call pGetTasks
  72. End Sub
  73. Private Sub Form_Resize()
  74. On Error Resume Next
  75. With lstTasks
  76.    .Move .Left, .Top, Me.ScaleWidth - .Left * 2, Me.ScaleHeight - .Top - cmdRefresh.Height - (2 * Screen.TwipsPerPixelY)
  77.    cmdRefresh.Top = .Height + .Top + (2 * Screen.TwipsPerPixelY)
  78.    cmdSwitch.Top = cmdRefresh.Top
  79.    cmdClose.Top = cmdRefresh.Top
  80. End With
  81. End Sub
  82. Private Sub pGetTasks()
  83. Call fEnumWindows(lstTasks)
  84. On Error Resume Next
  85. lstTasks.ListIndex = 0
  86. End Sub
  87. Sub SetNewCaption(lpWindow, lpnewcaption As String)
  88.     Dim fx, fx2
  89.     fx = FindWindow(vbNullString, lpWindow)
  90.     fx2 = sendmessagebystring(fx, WM_SETTEXT, 0, lpnewcaption)
  91. End Sub
  92.